package com.niiwoo.civet.trade.service.credit;

import com.niiwoo.civet.trade.dto.request.credit.CreditLoanInvestProjectRequestDTO;
import com.niiwoo.civet.trade.dto.request.creditloan.MyCreditLoanRequestDTO;
import com.niiwoo.civet.trade.dto.response.MyCreditLoanResponseDTO;
import com.niiwoo.civet.trade.dto.response.credit.CreditProjectDTO;
import com.niiwoo.civet.trade.dto.response.credit.QueryCreditContractReponseDTO;
import com.niiwoo.civet.trade.dto.response.credit.QueryCreditInvestInfoReponseDTO;
import com.niiwoo.civet.trade.dto.response.credit.QueryCreditProjectDynamicReponseDTO;
import com.niiwoo.tripod.provider.dto.response.PageResponseDTO;

/**
 * 信用借.
 *
 * @author daizhiyue
 * @date 2017-12-14
 */
public interface CreditDubboService {


    /**
     *
     * @param dto
     * @return
     */
    PageResponseDTO<MyCreditLoanResponseDTO> myCreditLoanQuery(MyCreditLoanRequestDTO dto);

    /**
     * 信用借查询还款记录
     *
     * @param projectId
     * @param userId
     * @return
     */
    QueryCreditProjectDynamicReponseDTO queryCreditProjectDynamic(Long projectId, String userId, Long opId, Byte type);


    /**
     * 根据投资项目ID查询投资信息
     *
     * @param requestDTO
     * @return
     */
    PageResponseDTO<QueryCreditInvestInfoReponseDTO> queryCreditInvestInfoByProjectId(CreditLoanInvestProjectRequestDTO requestDTO);

    /**
     * 信用借查询合同参数
     *
     * @param type
     * @param userId
     * @return
     */
    QueryCreditContractReponseDTO queryCreditContractParas(Long projectId, String userId, byte type);
    /**
     * 判断用户是否存在信用借
     */
    int  queryCreditInvestorProject(String userId);

    /**
     * 通过标的id查询信用借项目
     * @param projectId
     * @return
     */
    default CreditProjectDTO getCreditProjectById(Long projectId){return null;}

}
